package com.agent.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.agent.exception.MyException;
import com.agent.exception.StaticExceptionCodes;
import com.agent.mapper.TravelAgencyMapper;
import com.agent.model.TravelAgency;
import com.agent.service.ITravelAgencySer;

@Service("travelAgencySer")
public class TravelAgencySerImpl implements ITravelAgencySer{
	@Autowired
	TravelAgencyMapper travelAgencyMapper;
	
	/*查看公海旅行社（未领取）*/
	public List<TravelAgency> findListTravelAgency() throws MyException {
		List<TravelAgency> resultList = travelAgencyMapper.findListTravelAgency();
		if(resultList.size()<0){
			throw new MyException(StaticExceptionCodes.TravelAgencyExcepion.travelAgencyEmptyError);
		}
		return resultList;
	}

}
